<template>
    <div @click="changeClick">{{myContent}}</div>
</template>
<script>
export default {
    props: {
        content: {
            type: String
        }
    },
    data: function () {
        return {
            myContent: this.content
        };
    },
    methods: {
        changeClick: function () {
            this.bus.$emit('busChange', this.myContent);
        }
    },
    mounted: function () {
        this.bus.$on('busChange', (msg) => {
            this.myContent = msg;
        });
    }
};
</script>
